home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / tools / czesc_2 / fifolib / defs.h < prev    next >
C/C++ Source or Header  |  1992-04-24  |  2KB  |  76 lines

  1.  
  2. /*
  3.  *  DEFS.H
  4.  *
  5.  */
  6.  
  7. #include <exec/types.h>
  8. #include <exec/nodes.h>
  9. #include <exec/ports.h>
  10. #include <exec/memory.h>
  11. #include <exec/libraries.h>
  12. #include <exec/execbase.h>
  13. #include <exec/semaphores.h>
  14. #include <devices/timer.h>
  15. #include <clib/alib_protos.h>
  16. #include <clib/exec_protos.h>
  17. #define IN_LIBRARY
  18. #include "fifo.h"
  19. #include <string.h>
  20.  
  21. #define LibCall __geta4 __stkargs
  22. #define Prototype extern
  23.  
  24. typedef unsigned char ubyte;
  25. typedef unsigned short uword;
  26. typedef unsigned long ulong;
  27. typedef struct MsgPort    MsgPort;
  28. typedef struct Message    Message;
  29. typedef struct MinNode    Node;
  30. typedef struct MinList    List;
  31. typedef struct List    MaxList;
  32. typedef struct Node    MaxNode;
  33. typedef struct Library    Library;
  34. typedef struct ExecBase ExecBase;
  35. typedef struct timerequest Iot;
  36. typedef struct SignalSemaphore SignalSemaphore;
  37.  
  38. #define FIFOF_CLOSEOF    0x00010000
  39. #define FIFOF_RDNORM    0x00020000
  40. #define FIFOF_WRNORM    0x00040000
  41.  
  42. typedef struct Fifo {
  43.     MaxNode fi_Node;
  44.     List    fi_HanList;
  45.     List    fi_WrNotify;
  46.     List    fi_RdNotify;
  47.     uword   fi_RRefs;
  48.     uword   fi_WRefs;
  49.     uword   fi_ORefs;
  50.     ubyte   fi_Lock;        /*  non-normal fifo's   */
  51.     ubyte   fi_Reserved;
  52.     long    fi_RIdx;
  53.     long    fi_WIdx;
  54.     long    fi_Flags;
  55.     SignalSemaphore fi_SigSem;    /*  normal fifo's       */
  56.     long    fi_BufSize;
  57.     long    fi_BufMask;
  58.     char    fi_Buf[4];
  59. } Fifo;
  60.  
  61. typedef struct FHan {
  62.     Node    fh_Node;
  63.     Fifo    *fh_Fifo;
  64.     long    fh_Flags;
  65.     MsgPort fh_Port;
  66.     Message fh_Msg;
  67.     long    fh_RIdx;
  68. } FHan;
  69.  
  70. extern const char LibName[];
  71. extern const char LibId[];
  72. extern List FifoList;
  73. extern ExecBase *SysBase;
  74.  
  75. #include "fifolib-protos.h"
  76.